﻿// Decompiled with JetBrains decompiler
// Type: UnityEngine.GradientUsageAttribute
// Assembly: UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
// MVID: E6AE6B5A-2752-4B07-9528-C8B77C62CE79
// Assembly location: C:\Users\windys\Unity\2021.3.39f1c1\Editor\Data\Managed\UnityEngine\UnityEngine.CoreModule.dll
// XML documentation location: C:\Users\windys\Unity\2021.3.39f1c1\Editor\Data\Managed\UnityEngine\UnityEngine.CoreModule.xml

using System;

#nullable disable
namespace UnityEngine
{
  /// <summary>
  ///   <para>Attribute used to configure the usage of the GradientField and Gradient Editor for a gradient.</para>
  /// </summary>
  [AttributeUsage(AttributeTargets.Field, Inherited = true, AllowMultiple = false)]
  public sealed class GradientUsageAttribute : PropertyAttribute
  {
    /// <summary>
    ///   <para>If set to true the Gradient uses HDR colors.</para>
    /// </summary>
    public readonly bool hdr = false;
    /// <summary>
    ///   <para>The color space the Gradient uses.</para>
    /// </summary>
    public readonly ColorSpace colorSpace = ColorSpace.Gamma;

    public GradientUsageAttribute(bool hdr)
    {
      this.hdr = hdr;
      this.colorSpace = ColorSpace.Gamma;
    }

    /// <summary>
    ///   <para>Attribute for gradient fields. Used to configure the GUI for the Gradient Editor.</para>
    /// </summary>
    /// <param name="hdr">Set to true if the colors should be treated as HDR colors (default value: false).</param>
    /// <param name="colorSpace">The colors should be treated as from this color space (default value: ColorSpace.Gamma).</param>
    public GradientUsageAttribute(bool hdr, ColorSpace colorSpace)
    {
      this.hdr = hdr;
      this.colorSpace = colorSpace;
    }
  }
}
